﻿using Net.Sz.Framework.Netty;
using Net.Sz.Framework.Netty.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CApp_Webapi
{
    /// <summary>
    /// 
    /// <para>PS:</para>
    /// <para>@author 失足程序员</para>
    /// <para>@Blog http://www.cnblogs.com/shizuchengxuyuan/</para>
    /// <para>@mail 492794628@qq.com</para>
    /// <para>@phone 13882122019</para>
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {

            HttpServer httpserver = NettyPool.AddHttpBind("127.0.0.1", 9527, 2);

            httpserver.AddHandler("*", new ActionHttpHandler((session) =>
            {
                session.AddContent("<html><body>webapi！</body></html>");
            }));

            httpserver.AddHandler("login", new ActionHttpHandler((session) =>
            {
                session.AddContent("<html><body>login holle ！</body></html>");
            }));

            httpserver.Start();

        }
    }
}
